﻿//Include("mz.string");

/**
 * @fileoverview 对拼接到 RegExp 字符串里的字符进行转义处理，以免出错
 * @author meizz
 * @version 20090426
 *
 * @name mz.string.escapeReg
 * @namespace mz.string.escapeReg
 * @param {String} str 需要 RegExp 转义的字符串
 * @return {String} 转义后的字符串
 */
mz.string.escapeReg = function(str){
	return str.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
};